import { createRouter, createWebHistory } from 'vue-router'
import Home from '../components/Home.vue'
import Hot from '../components/Hot.vue'
import Message from '../components/Message.vue'
import My from '../components/My.vue'
import Login from "../components/Login.vue";
import Detail from "../components/Detail.vue";
import Register from "../components/Register.vue";

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
  },
  {
    path: '/hot',
    name: 'Hot',
    component: Hot
  },
  {
    path: '/msg',
    name: 'Message',
    component: Message
  },
  {
    path: '/my',
    name: 'My',
    component: My
  },
  {
    path: '/login',
    name: 'login',
    component: Login
  },
  {
    path: '/detail/:id',
    name: 'detail',
    component: Detail
  },
  {
    path: '/register',
    name: 'register',
    component: Register
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router
